/*
 * @Author: kanglang
 * @Date: 2020-12-09 14:25:51
 * @LastEditors: 汪滔
 * @LastEditTime: 2021-06-03 11:44:30
 * @Description: 用户反馈--联系人
 */
import React, { useState } from 'react';
import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { px2dp } from '@/styles';

const Submit = ({ submit, style, hideView = true }) => {
  const submitFeedback = () => {
    submit && submit();
  };
  return (
    <View style={[styles.footer, style]}>
      <View style={styles.submitBox}>
        <TouchableOpacity
          activeOpacity={0.8}
          style={styles.submit}
          onPress={submitFeedback}
        >
          <Text style={styles.submitText}>提交</Text>
        </TouchableOpacity>
      </View>
      {
        hideView && <View style={styles.footItem} />
      }

    </View>
  );
};
export default Submit;
const styles = StyleSheet.create({
  footer: {
    width: '100%',
    // position: 'absolute',
    // bottom: 0,
    backgroundColor: '#FFFFFF'
  },
  submitBox: {
    height: px2dp(180),
    alignItems: 'center',
    justifyContent: 'center'
  },
  submit: {
    width: '80%',
    height: px2dp(88),
    borderRadius: px2dp(16),
    backgroundColor: '#BA914A',
    alignItems: 'center',
    justifyContent: 'center',
  },
  submitText: {
    color: '#FFFFFF',
    fontSize: px2dp(36)
  },
  footItem: {
    height: px2dp(56)
  }
});
